import React, {Component} from 'react';
import Markdown from 'react-markdown';
import {Anchor, Row, Col} from 'antd';

const {Link} = Anchor;

class JsPage extends Component {
    constructor(props) {
        super(props);
    }
    render() {

        return (
            <div style={{background:"#c0d2bc"}}>
                <Row>
                    <Col span={19}>
                        <h3 id="python_upgrade"> Mac 升级Python 2.7 到 Python 3.7 </h3>
                        <Markdown source={"安装Python 3.7\n\n" +
                        "1、下载地址如下：https://www.python.org/downloads/\n\n" +
                        "2、点击下载好的pkg文件进行安装\n\n" +
                        "3、安装完成之后，python 3.70的默认安装路径如下：/Library/Frameworks/Python.framework/Versions/3.7\n\n" +
                        "修改profile文件\n" +
                        "在terminal里运行open  ~/.bash_profile，打开~/.bash_profile，直接修改文件即可\n" +
                        "    添加：\n\n" +
                        "    alias python=\"/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7\"\n\n" +
                        "重启一下Terminal，使修改后的文件生效。\n\n" +
                        "python --version \n\n"}/>
                        <h3 id="version_reverse"> Python 2.7与Python 3.7版本的切换 </h3>
                        <Markdown source={"使用Python 2.7时，直接将~/.bash_profile文件中3.7的版本注释掉\n\n" +
                        "使用Python 3.7时，直接将~/.bash_profile文件中3.7的版本打开"}/>

                        <h3 id="ide">集成开发环境 </h3>
                        <Markdown source={"https://www.runoob.com/python/python-install.html"}/>
                    </Col>
                    <Col span={5}>
                        <Anchor showInkInFixed="true" style={{background:"#ebefe0"}}>
                            <Link href="#python_upgrade" title="Mac 升级Python 2.7 到 Python 3.7"/>
                            <Link href="#version_reverse" title="Python 2.7与Python 3.7版本的切换"/>
                            <Link href="#ide" title="集成开发环境"/>

                        </Anchor>
                    </Col>
                </Row>
            </div>

        );
    }
}

export default JsPage;